import React from 'react';
import { ToIcon } from '../index.js';
import styles from './index.less';

const Title = (props) => {
  const { history } = props;
  return (
    <div className={styles.container}>
      <span className={styles.label}>送出省份：</span>
      <span className={styles.content}>{history.sendAdd}</span>
      <span className={styles.label}>价格：</span>
      <span className={styles.content}>{history.sendPrice}</span>
      <ToIcon margin />
      <span className={styles.label}>受端省份：</span>
      <span className={styles.content}>{history.acceptAdd}</span>
      <span className={styles.label}>价格：</span>
      <span className={styles.content}>{history.acceptPrice}</span>

      <div className={styles.result}>
        <span className={styles.label}>输配电价(元/MWh)：</span>
        <span className={styles.content}>{history.powerSendPrice}</span>
        <span className={styles.label}>综合线损率(%)：</span>
        <span className={styles.content}>{history.totalLoss}</span>
      </div>
    </div>
  );
};

export default Title;
